/*
 * Copyright 2004 Perforce Software.  All rights reserved.
 *
 * Developed by Data Shades Ltd.
 */

#include "StrBufArray.h"

StrBufArray::~StrBufArray() 
{
	for ( int i=0; i<Count(); i++ ) {
		StrBuf *buff = (StrBuf *)VarArray::Get( i );
		delete buff;
	}
}

void StrBufArray::Put( void *v ) 
{
	StrBuf *buff = new StrBuf();
	*buff = (char *)v;
	VarArray::Put( buff );
}

void *StrBufArray::Get( int i ) 
{
	StrBuf *buff = (StrBuf *)VarArray::Get( i );
	return buff->Text();
}